#ifndef _EXCEPT_H_
#define _EXCEPT_H_

#include <iostream>
#include <string>
#include <string.h>

class Exception
{
 public:
  Exception()
    {}
  virtual void print()=0;
  virtual std::string what()=0;
  virtual ~Exception() {}
};

class Warning : public Exception
{
 public:
  Warning() 
    : Exception()
    {}

    virtual void print()=0;
    virtual std::string what()=0;
    virtual ~Warning() {}
};

class NoError : public Exception
{
 public:
  NoError() 
    : Exception()
    {}

    virtual void print()=0;
    virtual std::string what()=0;
    virtual ~NoError() {}
};

class FatalError : public Exception
{
 public:
  FatalError() 
    : Exception()
    {}

    virtual void print()=0;
    virtual std::string what()=0;
    virtual ~FatalError() {}
};

class NormalExit : public NoError
{
 public:
  NormalExit() :  NoError()
  {}

  virtual void print()
  {
    std::cerr << what() << std::endl;
  }
  virtual std::string what()
  { return std::string("Normal Exit"); }
  virtual ~NormalExit() {}
};

class CommandLineArgumentError : public FatalError
{
 public:
  CommandLineArgumentError() 
    : FatalError()
  {}

  virtual void print()
  {
    std::cerr << what() << std::endl;
  }
  virtual std::string what()
  { 
    std::string str("Error in Command Line Arguments"); 
    return str;
  }
  virtual ~CommandLineArgumentError() {}
};

#endif
